import http from "@/utils/request";

export const getDrugProblem = (params) => {
  //返回订单列表
  return http.get("/drugProblem/page", {
    params: {
      type: params.type,
      curPage: params.curPage,
      limit: params.limit,
      name: params.sname,
    },
  });
};

export const getTypeList = (params) => {
  //返回供应商列表
  return http.get("/drugProblem/typeList");
};

export const retToWarehouse = (param) => {
  //回仓
  const myparams = new URLSearchParams();
  myparams.append("dpid", param);
  return http.post("/drugProblem/retToWarehouse", myparams);
};

export const retToFactory = (param) => {
  //回仓
  const myparams = new URLSearchParams();
  myparams.append("dpid", param);
  return http.post("/drugProblem/retToFactory", myparams);
};
